package com.binance.assetservice;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

import com.binance.assetservice.web.utils.Constants;
import com.binance.autojob.annotation.EnableAutotjob;
import com.binance.feign.ribbon.config.FeignRibbonClientAutoConfiguration;
import com.binance.master.utils.IPUtils;

@EnableAutoConfiguration(
        exclude = {org.springframework.cloud.netflix.feign.ribbon.FeignRibbonClientAutoConfiguration.class})
@SpringCloudApplication
@EnableFeignClients(basePackages = {"com.binance.account.api", "com.binance.mbxgateway.api"})
@EnableAsync
@EnableScheduling
@EnableCaching
@Import(FeignRibbonClientAutoConfiguration.class)
@EnableAutotjob
public class Application {

    public static void main(String[] args) {
        System.setProperty(Constants.LOCAL_IP, IPUtils.getIp());
        SpringApplication.run(Application.class, args);
    }
}
